package com.xt.purchasingsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xt.purchasingsystem.model.BuyerExecuteDetail;
import com.xt.purchasingsystem.vo.BuyerExecuteDetailVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  采购执行明细 Mapper 接口
 * </p>
 *
 * @author yhp
 * @since 2020-05-31
 */
public interface BuyerExecuteDetailMapper extends BaseMapper<BuyerExecuteDetail> {
    /**
     * 根据采购执行单编号查询此编号所有的明细的方法
     * @param buyerExecuteId
     * @return
     */
    List<BuyerExecuteDetail>  getAllBuyerExecuteDetailByBuyerExecuteId(String buyerExecuteId);

    List<BuyerExecuteDetailVo>  getAllBuyerExecuteDetailVoByBuyerExecuteId(String buyerExecuteId);

    /**
     * 根据指定天数和供应商编号查询这天所有的采购总数
     * @param supplierId
     * @param day
     * @return
     */
    Long getSumAmountBySupplierIdAndDate(@Param("supplierId") String supplierId , @Param("day") int day);
}
